<template>
  <div>
    <el-dialog :visible.sync="dialogVisible" title="提交审核" top="30vh" width="500px">
      <el-form label-width="90px" size="mini" class="demo-ruleForm">
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="remarks" placeholder="备注" maxlength="300" show-word-limit type="textarea" rows="3" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="dialogVisible=false,loading=false">取 消</el-button>
        <el-button :loading="loading" type="primary" size="mini" @click="$emit('onsubmit',remarks)">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: 'SubmitApprovalDialog',
  props: {
    dialogLoading: Boolean
  },
  data() {
    return {
      dialogVisible: false,
      loading: false,
      remarks: null
    }
  },
  watch: {
    dialogVisible(newValue, oldValue) {
      this.remarks = ''
      this.loading = false
    }
  }
}
</script>
